package com.flyduck.security.vo;

/**
 * <p></p>
 *
 * @author flyduck 2021/7/2
 * @version V1.0
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify by user: flyduck 2021/7/2
 * @modify by reason:{方法名}:{原因}
 **/
public enum ApiResultCodeEnum {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    NETWORK_ERROR(504, "服务器忙"),
    VALIDATE_FAILED(400, "参数检验失败"),
    VALIDATE_VERIFICATION_CODE_FAILED(402, "验证码未通过验证"),
    USER_NOT_FOUND(404, "当前用户不存在"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限");

    private int code;
    private String message;

    private ApiResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
